Skip to content

feat(plugin): 迁移到 Agent Plugins v1.0.0 可移植布局 - #81

Merged
loong10k merged 5 commits into
mainfrom
portable-agent-plugins
Sep 28, 2026
Merged

loong10k merged 5 commits into
mainfrom
portable-agent-plugins

Conversation

@loong10k

Copy link
Copy Markdown
Contributor

feat(plugin): 迁移到 Agent Plugins v1.0.0 可移植布局

此前仅发布各客户端专属清单(.codex-plugin/、.zcode-plugin/、kimi.plugin.json),
不符合 Agent Plugins 规范。符合规范的客户端会因缺少根清单而整体拒绝该插件,
其中的 68 个技能一个也加载不到(§5.1/§5.3:缺清单是致命错误,不是警告)。

  • 新增根 plugin.json:$schema 常量 + name 约束 + 封闭字段集;客户端专属的
    interface 等数据移入 extensions["com.openai"] / extensions["ai.nanoco.nanoclaw"]
  • version 取基础版本,+codex. 构建元数据留在兼容通道
  • 新增客户端扩展目录,让非可移植的 commands/hooks/agents 对注册表客户端可见:
    • 新增 com.github.copilot/(VS Code 与 GitHub Copilot 共用)
    • 新增 dev.openhands/(OpenHands)
      根目录副本保留,Codex/ZCode/Kimi 通道不受影响
  • 新增 scripts/validate_portable_plugin.py:纯标准库、无网络,按发布 schema
    校验清单、技能发现与镜像漂移
  • 新增 docs/portable-migration.md 记录迁移内容与客户端覆盖

校验:19/19 包通过规范校验;4655 个测试,红色套件 9 个且全部为迁移前既有失败,
本次迁移零新增失败。
仓库内同步调整:

  • scripts/check_architecture.py:把 scripts/validate_portable_plugin.py 登记进
    SCRIPT_ROLES(角色 entry),否则未分类顶层脚本会触发架构门禁。

本 PR 只包含可移植布局迁移(23 个文件)。仓库受分支保护(需 PR + 3 项状态检查),故走 PR。

  • 校验:python3 scripts/validate_portable_plugin.py PASS
  • 测试:632 个测试通过(与迁移前基线一致,零新增失败)

此前仅发布各客户端专属清单(.codex-plugin/、.zcode-plugin/、kimi.plugin.json),
不符合 Agent Plugins 规范。符合规范的客户端会因缺少根清单而整体拒绝该插件,
其中的 68 个技能一个也加载不到(§5.1/§5.3:缺清单是致命错误,不是警告)。

- 新增根 plugin.json:$schema 常量 + name 约束 + 封闭字段集;客户端专属的
  interface 等数据移入 extensions["com.openai"] / extensions["ai.nanoco.nanoclaw"]
- version 取基础版本,+codex.<stamp> 构建元数据留在兼容通道
- 新增客户端扩展目录,让非可移植的 commands/hooks/agents 对注册表客户端可见:
  - 新增 `com.github.copilot/`(VS Code 与 GitHub Copilot 共用)
  - 新增 `dev.openhands/`(OpenHands)
  根目录副本保留,Codex/ZCode/Kimi 通道不受影响
- 新增 scripts/validate_portable_plugin.py:纯标准库、无网络,按发布 schema
  校验清单、技能发现与镜像漂移
- 新增 docs/portable-migration.md 记录迁移内容与客户端覆盖

校验:19/19 包通过规范校验;4655 个测试,红色套件 9 个且全部为迁移前既有失败,
本次迁移零新增失败。
仓库内同步调整:
- scripts/check_architecture.py:把 scripts/validate_portable_plugin.py 登记进
  SCRIPT_ROLES(角色 entry),否则未分类顶层脚本会触发架构门禁。
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T15:19:11.365326Z af59438 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42df8af584

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread com.github.copilot/hooks/env_check.py Outdated
Comment thread plugin.json
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py
CI(skills-check 的 ruff check scripts)在 #81 抓到 scripts/validate_portable_plugin.py
的 SIM102。合并为单个条件表达式,校验行为不变。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a22c8f82e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dev.openhands/commands/check.json
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated
- validate_portable_plugin.py:远程 MCP URL 完整解析(scheme+host、禁空白);
  frontmatter 分隔符必须整行 ---;扫描跳过点前缀路径;parity 先判
  extensions.com.openai 类型;错误信息不再指向未随包分发的工作区脚本
- hooks/*.py:PLUGIN_ROOT 由 parents[1] 改为向上查找含 plugin.json 的祖先目录,
  修复镜像到 com.github.copilot/ 与 dev.openhands/ 后 import 在 fail-open 前
  抛 ModuleNotFoundError 的问题(三种位置均已验证解析到真实包根)
- 同步刷新两个扩展目录镜像

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66fe7ba474

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dev.openhands/hooks/hooks.json
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated
Comment thread scripts/validate_portable_plugin.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f47f06087

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py
Comment thread scripts/validate_portable_plugin.py
Comment thread plugin.json
Comment thread scripts/validate_portable_plugin.py
@loong10k
loong10k merged commit 7b1a5d7 into main Sep 28, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af59438233

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugin.json
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "codeguard",
"version": "0.16.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bump the published version for these changes

The portable manifest still advertises the already-published 0.16.1, so marketplaces cannot offer this release to existing 0.16.1 users. Fresh evidence since the earlier comment is that the reviewed squash now includes behavioral fixes such as corrected hook-root discovery and validator hardening, so the prior characterization as a layout-only change no longer applies; bump and synchronize the complete manifest/marketplace version chain.

AGENTS.md reference: AGENTS.md:L13-L14

Useful? React with 👍 / 👎.

if any(ch.isspace() for ch in url):
report.fail(where, f"url {url!r} must not contain whitespace (§7.2.1)")
else:
parts = urlsplit(url)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Catch URL parser errors

Fresh evidence in this revision is that the new urlsplit validation itself raises ValueError for malformed authorities such as https://[. Supplying that value in an MCP sse or streamable-http entry makes the validator terminate with a traceback, so --json emits no report and subsequent package checks are skipped; catch parser errors and record the URL as invalid instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant